package com.hqyj.dao.dao;

import com.hqyj.pojo.Yan_addcustomerpojo;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface Yan_Accountdao {
    @Delete("delete from manager where userName = #{userName}")
    int remove(String userName);

    // 新增住户
    @Insert("insert into manager (userName, email, phone, address, manager, sex) values(#{userName},#{email},#{phone}, #{address},#{manager}, #{sex})")
    int add(Yan_addcustomerpojo yan_addcustomerpojo);

    //查询住户
    @Select("select * from manager where userName = #{userName}")
    List<Yan_addcustomerpojo> search(String userName);

    @Update("update manager set address=#{address},sex=#{sex},phone=#{phone},manager=#{manager} where userName=#{userName}")
//    int updateAccount(Yan_addcustomerpojo yan_addcustomerpojo);
    int updateAccount(String userName, String address, String sex,String phone,String manager);
}
